#pragma once
#include "core/subsystem.h"
#include "input/inputdata.h"
//#include "input/inputprocessor.h"

class InputMgrImpl;

class InputSys: public BaseSubsystem
{

	typedef boost::signals2::signal<void (InputKeyCodeEnum keyCodeEnum)> KeySignalType;
	typedef boost::signals2::signal<void (InputMouseState& mouseState, InputMouseButtonEnum mouseButtonEnum)> MouseSignalType;
	typedef boost::signals2::signal<void (InputJoyStickState& joyState, int index )> JoySignalType;

	friend class InputMgrImpl;
private:
	std::unique_ptr<InputMgrImpl> m_inputMgr;
	//std::unique_ptr<IProcessor> m_inputProcessor;
	

public:
	InputSys(AppRoot* const approot);
	virtual ~InputSys(void);

	virtual void init(const PlatformData& data);
	virtual void shutdown();

	void captureInput(); //main loop processor

	/////////////////////////////////////segnali
	//key
	KeySignalType signalKeyPressed;
	KeySignalType signalKeyReleased;
	//mouse
	MouseSignalType signalMouseMoved;
	MouseSignalType signalMousePressed;
	MouseSignalType signalMouseReleased;
	//joystick
	JoySignalType signalJoyButtonPressed;
	JoySignalType signalJoyButtonReleased;
	JoySignalType signalJoyAxisMoved;
	JoySignalType signalJoyPovMoved;


private:

};

